import random

def generate_test_data():
    """生成测试数据"""
    test_cases = []
    
    # 示例1
    test_cases.append(([1,1,1,1,1], 3))
    
    # 示例2
    test_cases.append(([1], 1))
    
    # 简单测试用例
    test_cases.append(([1,2], 1))
    test_cases.append(([1,2,3], 0))
    
    # 边界情况
    test_cases.append(([1], -1))
    test_cases.append(([0,0,0], 0))
    
    # 随机生成的测试用例
    for _ in range(5):
        length = random.randint(3, 10)
        nums = [random.randint(1, 20) for _ in range(length)]
        target = random.randint(-sum(nums), sum(nums))
        test_cases.append((nums, target))
    
    return test_cases

def generate_large_test_data():
    """生成大规模测试数据"""
    test_cases = []
    
    # 边界情况
    test_cases.append(([0] * 20, 0))
    test_cases.append(([1] * 20, 10))
    
    # 可能导致超时的测试用例
    test_cases.append(([18,47,49,45,31,13,45,44,33,45,44,43,21,30,23,46,43,10,3,30], 23))
    
    # 大数组测试
    nums = [random.randint(1, 50) for _ in range(15)]
    target = random.randint(-sum(nums)//2, sum(nums)//2)
    test_cases.append((nums, target))
    
    # 极端情况：所有数字相同
    test_cases.append(([5] * 18, 25))
    
    return test_cases

def generate_stress_test_data():
    """生成压力测试数据"""
    test_cases = []
    
    # 最大规模测试（接近LeetCode限制）
    nums = [random.randint(1, 1000) for _ in range(20)]
    target = random.randint(-1000, 1000)
    test_cases.append((nums, target))
    
    return test_cases
